package com.guangzhi.weijianzhi.adapter;

import java.util.List;

import com.guangzhi.weijianzhi.R;
import com.guangzhi.weijianzhi.company.center.CompileCompanyInfoActivity;
import com.guangzhi.weijianzhi.view.IndustryData.ProvinceAndCity;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class MyIndustryadapterTwo extends BaseAdapter {
	
	private List<ProvinceAndCity> ens;
	private Context context;
	public MyIndustryadapterTwo(List<ProvinceAndCity> entitys,Context con){
		this.ens = entitys;
		this.context =con;
	}
	
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
			return ens.size();
		
	}
	
	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}
	
	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}
	
	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		// TODO Auto-generated method stub
		TextView tv = new TextView(context);
		tv.setTextColor(context.getResources().getColor(R.color.black));
		ProvinceAndCity provinceAndCity = ens.get(arg0);
			tv.setText(provinceAndCity.name);
			tv.setGravity(Gravity.CENTER);
			tv.setPadding(0, 15, 0, 15);
		return tv;
	}



}
